package com.wbk.lotterysystemuserservice.service;

import com.wbk.lotterysystemuserservice.commons.bo.UserRegisterBO;
import com.wbk.lotterysystemuserservice.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public interface UserInfoService {

    //判断用户是否被封禁
    Map<String, Object> loginUserLock(String username);

    //登录错误，放入缓存，错误次数+1
    String loginError(String username);

    //根据用户名和密码得到用户
    User getUserByUsernameAndPassword(String username, String password);

    //根据手机号得到用户
    User getUserByMobile(String mobile);

    //根据邮箱得到用户
    User getUserByEmail(String email);

    //根据用户名得到用户
    User getUserByUsername(String username);

    //根据用户编号得到用户
    User getUserByUserNo(Long userNo);

    //判断验证码是否到期
    boolean codeExpire(String email, String code);

    //保存用户
    User save(UserRegisterBO record);

    //修改密码
    int reset(User user);

}
